Speed up shadow of x86_64 Linux guests using 3 paging levels.
authorTim Deegan <Tim.Deegan@xensource.com>
Tue, 14 Nov 2006 18:21:51 +0000 (18:21 +0000)
committerTim Deegan <Tim.Deegan@xensource.com>
Tue, 14 Nov 2006 18:21:51 +0000 (18:21 +0000)
Linux kernel 2.6.9 or older uses 3 paging levels and its direct map is
from 0x10000000000.

Signed-off-by: Xin Li <xin.b.li@intel.com>
xen/arch/x86/mm/shadow/common.c

index 373fa491e16b4510a984e8c8a8ecd19f33ffcb9c..7461882a38a370519a8d4b7e4c17050ea3e09687 100644 (file)
@@ -1953,9 +1953,11 @@ int shadow_remove_write_access(struct vcpu *v, mfn_t gmfn,
             case 3: GUESS(0x70381C00000UL + (fault_addr >> 27), 3); break;
             }
 
-            /* Linux direct map at 0xffff810000000000 */
+            /* 64bit Linux direct map at 0xffff810000000000; older kernels 
+             * had it at 0x0000010000000000UL */
             gfn = sh_mfn_to_gfn(v->domain, gmfn); 
             GUESS(0xffff810000000000UL + (gfn << PAGE_SHIFT), 4); 
+            GUESS(0x0000010000000000UL + (gfn << PAGE_SHIFT), 4); 
         }
 #endif /* CONFIG_PAGING_LEVELS >= 4 */
 #endif /* CONFIG_PAGING_LEVELS >= 3 */